﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJ.Operation.SalePurchase.Sale;
using PJ.Business.SalePurchase.Sale;
using PJ.Business.SalePurchase;

namespace PJ.Operation.WCF
{
    public class SaleInvoiceWCFService : ISaleInvoiceWCFService
    {
        public SaleInvoiceWCFService()
        {
        }

        public SaleInvoiceWCFService(ICreateSaleInvoice createSaleInvoice)
        {
            ICreateSaleInvoice = createSaleInvoice;
        }

        public ICreateSaleInvoice ICreateSaleInvoice { get; set; }

        public CreateInvoiceResult CreateSaleInvoice(string customerId, string reference, List<string> inventoryItemIds, List<double> quantities, List<string> units)
        {
            return new CreateInvoiceResult(ICreateSaleInvoice.Execute(customerId, reference, inventoryItemIds, quantities, units));
        }
    }
}
